<%--
  Created by IntelliJ IDEA.
  User: 31892
  Date: 2021/11/30
  Time: 6:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>梁宇</title>
    <script>
        function del(id){
            if (confirm("确认删除么")){
                location.href="delete?id="+id;
            }else {
                return;
            }
        }
    </script>
</head>
<body>
<div style="text-align: right;float: right">
    <a href="savePage"> 添加</a>
</div>
    <table>
        <tr>
            <td>姓名</td>
            <td>年龄</td>
            <td>生日</td>
            <td>存款</td>
        </tr>
    <c:forEach items="${list}" var="s">
        <tr>
            <td>${s.name}</td>
            <td>${s.age}</td>
            <td>${s.birthday}</td>
            <td>${s.balance}</td>
            <td><a href="updatePage?id=${s.id}">修改</a><a href="javascript:void(0)" onclick="del(${s.id})">删除</a></td>
        </tr>
    </c:forEach>
    </table>
</body>
</html>
